<?php

namespace App\Jobs;

use App\Models\Test;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class sendEmail implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * @param \DateInterval|\DateTimeInterface|int|null $delay
     */

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->delay = 10;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
//        echo '测试';
        Test::query()->where(['id'=>1])->increment('num',2);
//        $this->delete();
    }
}
